import request from '@/util/request'
export default {
    // 1. 查询所有用户
    findUsers() {
        return request({
            url: '/user/list.do',
            method: 'get',
        })
    },
    // 2. 分页查询用户
    findByPage(page, pageSize) {
        return request({
            url: `/user/findByPage.do?page=${page}&pageSize=${pageSize}`,
            method: 'get',
        })
    },
    //3. 条件查询分页
    search(page,pageSize,data){
        return request({
            url: `/user/search.do?page=${page}&pageSize=${pageSize}&data=${data}`,
            method: 'post',
            data
        })
    },
    save(data){
        return request({
            url: `/user/save.do?data=${data}`,
            method: 'post',
            data
        })
    }
}